﻿namespace LogManager.Core.Infrastructure.Logging
{
    using System;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class Logger : ILogger
    {
        public event Action<LogResult> LogAdded = delegate { };

        public void AddSuccess(string message, string details)
        {
            LogAdded(new LogResult(message, details, LogType.Success));
        }

        public void AddInfo(string message, string details)
        {
            LogAdded(new LogResult(message, details, LogType.Info));
        }

        public void AddWarning(string message, string details)
        {
            LogAdded(new LogResult(message, details, LogType.Warning));
        }

        public void AddError(string message, string details)
        {
            LogAdded(new LogResult(message, details, LogType.Error));
        }
    }
}
